<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>263-丑数</title>
	</head>
	<body>
		<script type="text/javascript">
			/**
			 * @param {number} n
			 * @return {boolean}
			 * 
			 */
			var isUgly = function(n) {
			    while(n)
			    {
			        if(n%2 === 0) n /= 2;
			        else if(n%3 === 0) n /= 3;
			        else if(n%5 === 0) n /= 5;
			        else break;  //直到不能被235整除后退出
			    }
			    return n === 1;
			};
		</script>
	</body>
</html>
